package com.automapper.criterion;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ExpressionContext {

	Map<String, Object> paramMap = new HashMap<>();
	// 存放where过滤条件的表达式
	List<Criterion> expressionList = new ArrayList<>();
	Criterion pageExpression;
	
	public void addExpression(Criterion expression) {
		paramMap.putAll(expression.getValues());
		expressionList.add(expression);
	}
	
	public List<Criterion> getExpressionList() {
		return expressionList;
	}

	public Criterion getPageExpression() {
		return pageExpression;
	}

	public void setPageExpression(Criterion pageExpression) {
		this.pageExpression = pageExpression;
	}

	public Map<String, Object> getParamMap() {
		return paramMap;
	}
}
